package cn.com.oceansoft.nos.common.util;

import javax.servlet.http.HttpServletRequest;

public class ServerInfo {

    /**
     * 判断是否为AJAX请求
     *
     * @param request HttpServletRequest
     * @return true是, 反之false
     */
    public static boolean isAjax(HttpServletRequest request) {
        return request != null && "XMLHttpRequest".equalsIgnoreCase(request.getHeader("X-Requested-With"));
    }
}
